import React from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import BasicLayout from '@/layouts/BasicLayout';
// import Login from '@/pages/login';
import { ConfigProvider } from 'antd';
import enUS from 'antd/lib/locale/en_US';
import zhCN from 'antd/lib/locale/zh_CN';

const Layout = () => {
  const locale = localStorage.getItem('language') == 'zh_CN' ? zhCN : enUS;
  return (
    <div>
      <Router>
        <Switch>
          <ConfigProvider locale={locale}>
            {/* <Route exact path="/login" component={Login} /> */}
            <Route path="/" key="container" render={(props: any) => <BasicLayout {...props} />} />
          </ConfigProvider>
        </Switch>
      </Router>
    </div>
  );
};

export default Layout;
